function [data,state]=dataRead(fileName,M,N)
    fid=fopen(fileName,'rb');
    if(fid>0)
        [data,count]=fread(fid,[M,N],'float');
        if(count==size(data,1)*size(data,2))
            state=1;
        else
            state=-1;
        end
    end
    fclose(fid);
end
